package org.mags.dao.common;

import java.io.Serializable;

public interface DataProvider<T> 
			extends RestrictionBuilderFactory 
					, DatabaseAccess {
	public Class<T> getPersistentClass();
	public Object execute(DBOperation operation);
	public Object executeInTransaction(Transaction operation);
	public void createOrUpdate(T record);
	public Serializable create(T record);
	public Number update(Attribute[] attributes, RestrictionBuilder restriction);
	public void update(T record);
	public void delete(T record);
	public boolean existsWithId(Serializable id);
	public Number count();
	public T getByIdForUpdate(Serializable id);
	public T getById(Serializable id);
	public T newInstance();
}
